import request from '@/utils/request'

// 订单列表
export function orderGetList(data: any) {
  return request({
    url: '/scrm-api/console/sale/order/getList',
    method: 'post',
    data
  })
}
// 订单列表提交审核
export function auditSubmit(data: any) {
  return request({
    url: '/scrm-api/console/sale/order/audit/submit',
    method: 'post',
    data
  })
}
// 待审核订单列表
export function orderAuditGetList(data: any) {
  return request({
    url: '/scrm-api/console/sale/order/audit/getList',
    method: 'post',
    data
  })
}
// 待审核订单列表
export function orderAudit(data: any) {
  return request({
    url: '/scrm-api/console/sale/order/audit',
    method: 'post',
    data
  })
}
// -----------------------------------------------------高级设置-----------------------------------------------------
// 审核人员-详情
export function getOrderAuditInfo(params?: any) {
  return request({
    url: '/scrm-api/console/sale/order/senior/audit/info',
    params
  })
}
// 审核人员-更新
export function orderAuditUpdate(data?: any) {
  return request({
    url: '/scrm-api/console/sale/order/senior/audit/update',
    method: 'POST',
    data
  })
}
// 订单来源-列表
export function getOrderSeniorlist(params: any) {
  return request({
    url: '/scrm-api/console/sale/order/senior/source/getlist',
    params
  })
}
// 订单来源-状态
export function orderUpdateStatus(params: any) {
  return request({
    url: '/scrm-api/console/sale/order/senior/source/status',
    params
  })
}
// 订单来源-删除
export function orderUpdateDelete(params: any) {
  return request({
    url: '/scrm-api/console/sale/order/senior/source/del',
    params
  })
}
// 新建订单来源
export function orderSeniorCreate(data: any) {
  return request({
    url: '/scrm-api/console/sale/order/senior/source/creat',
    method: 'POST',
    data
  })
}
// 新建订单
export function orderCreate(data: any) {
  return request({
    url: '/scrm-api/console/sale/order/creat',
    method: 'POST',
    data
  })
}
// 订单详情/查看
export function getOrderInfo(params: any) {
  return request({
    url: '/scrm-api/console/sale/order/info',
    params
  })
}
// 订单详情-审核列表
export function getOrderInfoAudit(data: any) {
  return request({
    url: '/scrm-api/console/sale/order/info/audit/getList',
    method: 'POST',
    data
  })
}
// 订单编辑
export function orderEdit(data: any) {
  return request({
    url: '/scrm-api/console/sale/order/update',
    method: 'POST',
    data
  })
}
// 新增收货地址
export function orderAddressCreate(data: any) {
  return request({
    url: '/scrm-api/console/sale/order/address/creat',
    method: 'POST',
    data
  })
}
// 新增收货地址
export function getOrderAddressList(data: any) {
  return request({
    url: '/scrm-api/console/sale/order/address/getList',
    method: 'POST',
    data
  })
}
